﻿@using System.Web.Optimization
@{
	Layout = "~/Views/Shared/DefaultListHtml.cshtml";
	ViewBag.Title = "文件管理列表";
	ViewBag.Url = "/home";
}
@section HeadCss{
	@Styles.Render("~/Contecnt/EasyUICss")
}
@section HeadJs{
	@Scripts.Render("~/Contecnt/EasyUIJs")
	<script>
		$(function () {
			//加载列表
			$("#list").datagrid({
				pagination: true,
				pageSize: 10,
				pageList: [10, 50, 100],
				sortName: "resourceId",
				sortOrder: "desc",
				width: 'auto',
				nowrap: false,
				border: false,
				rownumbers: true,
				singleSelect: true,
				idField: "resourceId",
				height: 330,
				url: '@ViewBag.Url/GetListTask',
				striped: true, //奇偶显示
				columns: [
                    [
                        { field: 'resourceId', title: '', align: 'center', checkbox: true },
                        { field: 'FuserName', title: '接受人', width: $(this).width() * 0.15, align: 'center' },
                        { field: 'Fmail', title: '邮箱', width: $(this).width() * 0.15, align: 'center', sortable: true },
                        {
                        	field: 'FtypeID', title: '网络', width: $(this).width() * 0.15, align: 'center', sortable: true, formatter: function (value, rowdata) {
                        		if (rowdata.FtypeID == 0) {
                        			return "外网";
                        		}
                        		return "内网";
                        	}
                        },
                        {
                        	field: 'FResourcestatus',
                        	title: '文件状态',
                        	width: $(this).width() * 0.08,
                        	align: 'center',
                        	formatter: function (value, rowdata) {
                        		return checkStatus(rowdata.FResourcestatus);
                        	}
                        },
                    { field: 'ResourceName', title: '文件名', width: $(this).width() * 0.15, align: 'center', sortable: true },
					{ field: 'UploadStartTime', title: '上传开始时间', width: $(this).width() * 0.15, align: 'center', sortable: true },
					{ field: 'UploadEndTime', title: '上传结束时间', width: $(this).width() * 0.15, align: 'center', sortable: true },
                    { field: 'intervalTime', title: '花费秒数', width: $(this).width() * 0.15, align: 'center', sortable: true },
					    { field: 'FileSize', title: '文件大小', width: $(this).width() * 0.15, align: 'center', sortable: true }

                    ]
				]

			});
			$("input[name=fusedradio]").click(function () {
				searchdata(1);
			});
		});

		$(document).ready(function () {
			$('#btnDelete').click(function (e) {
				e.preventDefault();
				
				Enabled('1', 'http://10.1.1.46/api/updateTask/');
			});
		});
	</script>

}

<!--工具栏-->
<div class="toolbar-wrap">
	<div id="floatHead" class="toolbar">
		<div class="l-list">
			<ul class="icon-list">
				<li><a class="add" href="@ViewBag.Url/EdiTask"><i></i><span>新增</span></a></li>
				<li><a id="btnDelete" class="save" href="javascript:;"><i></i><span>发送</span></a></li>
				<li><a class="del" href="javascript:;"><i></i><span>删除</span></a></li>
			</ul>
		</div>
		<div class="r-list">

		</div>
	</div>
</div>

<!--/工具栏-->
<!--列表-->
<table id="list"></table>
<!--/列表-->